#include<stdio.h>
#include<iostream>

// lapacke headers
#include " lapacke.h "
#include " lapacke_config.h "
#include " lapacke_utils.h "

extern lapack_int LAPACKE_dgeev( int matrix_order, char jobvl, char jobvr,
lapack_int n, double * a, lapack_int lda, double * wr,
double * wi, double * vl, lapack_int ldvl, double * vr,
lapack_int ldvr );

int main(){
int matrix_order = LAPACK_COL_MAJOR;
char jobvl = ' N ' ;
char jobvr = ' V ' ;
int n = 50 ;
double A[ 2500 ];
for(int i=0;i<50;i++)
{
    for(int j=0;j<50;j++)
    {
	if(i==j)
	A[50*i+j]=50;
	else
	A[50*i+j]=0.01;
    }
}
int lda = n;
double wr[ 50 ]; 
double wi[ 50 ] 
for(int i=0;i<50;i++)
{
    wr[i]=0;
    wi[i]=0;
}
double vl[ 2500 ];
int ldvl = 50 ;
double vr[ 2500 ];
int ldvr = 50 ;     
int info = LAPACKE_dgeev(matrix_order,jobvl,jobvr,n,A,lda,wr,wi,vl,ldvl,vr,ldvr);
if (info == 0 ){
int i = 0 ;
for (i = 0 ;i < n;i ++ ){
printf( " %.6g\n " ,wr[i]);
}
}

return 0 ;
}
